<ion-view title="list index page ">

    <!-- side btn -->
    <ion-nav-buttons side="left">
        <button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
    </ion-nav-buttons>

  

    <ion-nav-buttons side="right">
    <div class="buttons">

        <button class="button button-icon icon ion-ios7-minus-outline " 
        ng-click="data.showDelete = !data.showDelete; data.showReorder = false"></button>

        <button class="button  button-icon icon ion-navicon"
        ng-click="data.showDelete = false; data.showReorder = !data.showReorder">
        <!-- Reorder -->
        </button>
    </div>
    </ion-nav-buttons>

    <ion-content>

        <!--  -->
        <label class="item item-input">
          <i class="icon ion-search placeholder-icon"></i>
          <input type="search" placeholder="Search" ng-model="query">
        </label>

        <ion-refresher
          pulling-text="Pull to refresh..."
          refreshing-text="Refreshing!"
          refreshing-icon="ion-loading-c"
          on-refresh="doRefresh()">
        </ion-refresher>

        <ion-list show-delete="data.showDelete" show-reorder="data.showReorder">
            <ion-item ng-repeat="l in lists.list | filter:query" type="item-text-wrap" href="#/list/edit/{{l.id}}">

                <ion-option-button class="button-assertive"ng-click="onDelete(l)"> 删除 </ion-option-button>
                <ion-option-button class="button-positive" ng-click="edit(l)" > 编辑 </ion-option-button>
                <ion-option-button class="button-calm" ng-click="share(l)"> 分享 </ion-option-button>

                <ion-reorder-button class="ion-navicon" on-reorder="moveItem(item, $fromIndex, $toIndex)"></ion-reorder-button>
                <ion-delete-button class="ion-minus-circled" ng-click="onDelete(l)"></ion-delete-button>
                <h3>{{l.title}}</h3>
                <p>{{l.content}}</p>
            </ion-item>
        </ion-list>

    </ion-content>
</ion-view>
